package com.atguigu.gmall.item.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

/**
 * @Author: 赵勇镔
 * @Time: 2021/5/18 9:39
 * @Description:
 */

@FeignClient(name = "service-item",fallback = DegradedItemFeignClient.class)//远程调用 也可以写降级处理
public interface ItemFeignClient {

    //数据汇总 页面所需要的四部分数据
    @GetMapping("/api/item/getItem/{skuId}")
    Map<String,Object> getItem(@PathVariable Long skuId);

}
